using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using KingCat_DataBase;


namespace KingCat_Server
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
            this.label3.Visible = false;
            this.label4.Visible = false;
            skinEngine1.SkinFile = @"../../SkinFiles/MP10/MP10.ssk";
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

     

        private void Login_Load(object sender, EventArgs e)
        {

        }

        private void button4_Click(object sender, EventArgs e)
        {
            this.label4.Visible = false;
            Boolean flag = DataBaseDao.getInstance().validateOfAdminitrator(textBox1.Text, textBox2.Text);
            if (flag)
            {
                this.Visible = false;
                new ServerControl().ShowDialog();
            }
            else
            {
                this.label4.Visible = true;
                this.label4.ForeColor = Color.Red;
            }
        }

        private void Login_Load_1(object sender, EventArgs e)
        {

        }

        private void button3_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
    }
}